package com.toocms.jinjuhang.ui.loading

import com.toocms.tab.expand.splash.BaseSplashActivity
import com.qmuiteam.qmui.util.QMUIStatusBarHelper
import android.content.Intent
import com.toocms.jinjuhang.R
import com.toocms.jinjuhang.ui.main.MainAty

/**
 * Description : 启动页
 * Author : Zero
 * Date : 2021/8/20
 */
class SplashAty : BaseSplashActivity() {
    override fun onActivityCreated() {
        QMUIStatusBarHelper.setStatusBarLightMode(this)
        startSplash(true)
    }

    override fun onSplashFinished() {
        // 判断是否为首次打开
        if (isFirstOpen) {
            setIsFirstOpen(false)
            startActivity(Intent(this, GuideAty::class.java))
            //            TabPush.getInstance().startActivity(this, GuideAty.class);
        } else {
            startActivity(Intent(this, MainAty::class.java))
            //            TabPush.getInstance().startActivity(this, MainActivity.class);
        }
        finish()
    }

    override fun getSplashImageResId() = R.mipmap.img_loading
}